﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Drifting.Graphics.EffectObjects;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;


namespace Drifting.Scenes
{

    public class Basic : Scene
    {
        protected Game1 game;
        protected GraphicsDevice device;
        protected Camera camera;
        protected Matrix view;
        protected Matrix projection;
        protected Grid grid;

        public Basic(ref Matrix view, ref Matrix projection, GraphicsDevice device, Camera camera, Game1 game)
        {
            camera.Camera_InitView(35, 15, 35, 0, 0, 0, (float)(Math.PI / 15), ref view, ref projection);

            this.device = device;
            this.camera = camera;
            this.view = view;
            this.projection = projection;
            this.game = game;

            grid = new Grid(view, projection, device);
            grid.setGrid(5, 1);
        }

        virtual public bool inXgoal(double[] q)
        {
            return false;
        }

        virtual public Color BackgroundColor()
        {
            return Color.LightGray;
        }

        virtual public void Draw(Matrix view, Matrix projection)
        {
            if(camera.IsReady == false)
                throw new NotImplementedException("forget to call Camera.Camera_InitView?");

            if (camera != null)
                this.view = view;
            if (projection != null)
                this.projection = projection;

            grid.Draw(view, projection);
        }

        virtual public void Update()
        {
        }

        virtual public void Terminate()
        {
        }

        virtual public void GetStatistics(ref List<string> info)
        {
        }
    }
}
